package com.imooc.springboot.dubbo.nilinili.provider.mapper;

import com.github.pagehelper.PageInfo;
import com.imooc.springboot.dubbo.nilinili.entity.dto.PhotoDetailDTO;
import com.imooc.springboot.dubbo.nilinili.provider.entity.po.PhotoPO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PhotoMapper {
    List<PhotoPO> selectPhotoPagesByCategoryId(Integer id);
    List<PhotoPO> selectAllPhotos();

    PhotoPO selectPhotoById(Integer id);

    Integer updateApprovalCountsById(Integer PhotoID);

    Integer selectApprovalCountsById(Integer PhotoID);

    List<PhotoPO> selectPhotosByUserId(String userId);


    Integer insertPhoto(PhotoPO photoPO);

    List<PhotoPO> getNewPhoto();

    Integer addPhotoViewCount(Integer photoId);
    int deletePhoto(String photoId);

    List<PhotoPO> getPhotoByName(String photoName);
}
